#获取cpu的频段时间分布
deviceId=$1
if [ $# != 1 ]; then
	echo "sh get-android-cpufreq.sh 4df742f8263bcf3d"
	exit 1;
fi

currentDir=$(cd "$(dirname "$0")"; pwd)
echo "current dir : "$currentDir
datDir=$currentDir/../../../target/android-info/battery/dat
htmlDir=$currentDir/../../../target/android-info/battery/html

adb -s $deviceId shell cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state > ${datDir}/cpufreq.dat

echo "get cpu freq to cpufreq.dat done!"
